<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>更换头像 - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/member.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
    <script type="text/javascript" src="__COMMJS__/swfobject.js"></script>
    <script type="text/javascript" src="__COMMJS__/avatarEditor/fullAvatarEditor.js"></script>
</head>

<body>
<div class="b-page">
    <Admintemplate file="Home/Public/header"/>

<div class="contentbj">
    <div class="member_body">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="180" valign="top" bgcolor="#f5f5f5">
                    <a href="__WEBURL__/user/index/uavatar">
                        <div class="touxiangarea">
                            <div class="uploadpic"></div>
                            <div class="touxiang"><img src="{$userinfo.uavatar|getUavatar}" alt=""/></div>
                        </div>
                    </a>


    <h3 class="listtitle">更换头像</h3>
                    <ul class="listcss">
                        <foreach name="usernav" item="un">
                            <li><a href="__WEBURL__/user/index/{$un.link}" class="{$un.act}">{$un.title}</a></li>
                        </foreach>
                    </ul></td>
                <td valign="top" style="padding-left:27px;">

                    <h1 class="member_title">更换头像</h1>
                    <div id="myContent"></div>
                    {$user_avatar}
                    </div>

                </td>
            </tr>
        </table>
    </div>
</div>
    
    <Admintemplate file="Home/Public/footer"/>

</div>

<script src="__JS__/index.js"></script>
<script src="__JS__/jquery.common.js"></script>
<script src="__JS__/jquery.form.min.js"></script>
<script src="__JS__/jquery.doajax.js"></script>

<script>
    $(document).ready(function(){
        $('.b-dongtaiItem').each(function(i,val){
            if(i%3==0) $(this).addClass('b-dongtaiItem_first');
        });
        $('.b-dongtaiItem__pic').hover(function(){
            $(this).find('.b-itemMask').stop(true,true).fadeIn();
        },function(){
            $(this).find('.b-itemMask').stop(true,true).fadeOut();
        });
        $('.b-itemMask').on('click',function(){
            $('body').css({overflow:'hidden'});
            $('.b-pop').show();
        });
        $('.b-popDetail__closeBtn').on('click',function(){
            $('body').css({overflow:'auto'});
            $('.b-pop').hide();
        });
    });
</script>
<script type="text/javascript">
    //头像上传回调
    function fullAvatarCallback(msg) {
        switch (msg.code) {
            case 1:

                break;
            case 2:

                break;
            case 3:
                if (msg.type == 0) {

                } else if (msg.type == 1) {
                    alert("摄像头已准备就绪但用户未允许使用！");
                } else {
                    alert("摄像头被占用！");
                }
                break;
            case 4:
                alert("图像文件过大！");
                break;
            case 5:
                if (msg.type == 0) {
                    $.tipMessage("头像已经修改，刷新后可见最新头像！", 0, 3000);
                } else {
                    alert(msg.content.msg);
                }
                break;
        }
    }
</script>


</body>
</html>